package com.zzc.controller;

import com.zzc.common.JsonResult;
import com.zzc.common.TableResult;
import com.zzc.pojo.AppInfo;
import com.zzc.service.AppInfoService;
import com.zzc.service.TokenService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zhouzhicheng
 * @version 1.0  2020/12/30
 */
@RequestMapping("/sys/app_info")
@RestController
public class AppInfoController {
    @Autowired
    private AppInfoService appInfoService;
    @RequestMapping("/table")
    public TableResult getAppInfoList( String corpName,Integer page, Integer limit){
        return appInfoService.getAppInfoList(corpName,page,limit);
    }
    @RequestMapping("/del")
    public JsonResult deleteAppInfoById(Integer[] ids){
        return appInfoService.deleteAppInforById(ids);
    }
    @RequestMapping("/add")
    public JsonResult addAppInfo(AppInfo appInfo){
        return appInfoService.insertAppInfor(appInfo);
    }
    @RequestMapping("/update")
    public JsonResult updateAppInfo(AppInfo appInfo){
        return appInfoService.updateByPrimaryKeySelective(appInfo);
    }

}
